<extend name="Public/base" />
<block name="content">
<script src="__JS__/jjhh.js?v={:C('TKE_VERSION')}"></script>
<div id="content">
	<div id="content-header">
		<div id="breadcrumb">
			<a href="{:U('Index/index')}" title="首页" class="tip-bottom"><i class="icon-home"></i> 首页</a> 
			<a href="#" class="current">{$meta_title}</a>
		</div>
	</div>
	<div class="container-fluid">
		<br/>
		<button class="btn btn-info" id="add">新 增</button>
		<button class="confirm btn btn-danger ajax-post" url="{:U('changeAskTags?method=delete')}" target-form="ids">删 除</button>
	</div>
	
	<div class="container-fluid search-form">
		<form class="m-filter" autocomplete="off">
			<div class="clearfix">
				<a class="pull-left btn btn-success btn-filter-show" id="j-filter-show"><span class="icon-chevron-down"></span></a>
			</div>
			<div class="filter-box" id="j-filter-box">
				<!-- 基础信息 -->
				<div class="filter-base filter-group">
					<a class="title"><span class="icon-list"></span> 分类筛选</a>
					<span class="control-group">
						<select class="form-control" style="width: 150px;" name="ask_category_pid" id="ask_category_pid" onchange="change_ask_category(this.value,'{:U('ServiceApi/getAskCategory')}',1)">
							<option value=0>选择一级分类</option>
							<notempty name="category_list">
								<volist name="category_list" id="vo">
									<option value='{$vo.ask_category_id}'>{$vo.ask_category_name|strip_tags}</option>
								</volist>
							</notempty>
						</select>
					</span>
					<span class="control-group">
						<select class="form-control" style="width: 150px;" name="ask_category_id" id="ask_category_id">
							<option value=0>选择二级分类</option>
							<notempty name="two_category_list">
								<volist name="two_category_list" id="vo">
									<option value='{$vo.ask_category_id}'>{$vo.ask_category_name|strip_tags}</option>
								</volist>
							</notempty>
						</select>
					</span>
				</div>
				<div class="filter-base filter-group">
					<a class="title"><span class="icon-list"></span> 位置筛选</a>
						<span class="control-group">
							<select class="form-control" style="width: 150px;" name="position" id="position">
								<option value='-1'>选择位置</option>
								<volist name=":C('ASK_TAGS_POSITION')" id="vo">
									<option value='{$key}'>{$vo}</option>
								</volist>
							</select>
						</span>
				</div>
				<div class="filter-input filter-group clearfix">
					<a class="title"><span class="icon-globe"></span>标签名称</a>
				  	<div class="control-group pull-left">
				    	<div class="controls">
				    		<input type="text" name="search_text" class="search-input" value="{:htmlspecialchars(I('search_text'))}" placeholder="请输入标签" style="margin-bottom:0;">
				    	</div>
				  	</div>
				</div>
			
				<div class="clearfix btn-group">
					<a class="btn btn-success btn pull-left" id="j-filter-hide" style="margin-left:15px;"><span class="icon-chevron-up"></span></a>
					<button type="button" id="search_button" url="{:U('Article/tags')}" class="btn btn-primary btn pull-left"><span class="icon-search"></span></button>
				</div>	
			</div>		
		</form>
	</div>
	<div class="container-fluid">	
		<div class="row-fluid">
			<div class="span12">
				<div class="widget-box">
					<div class="widget-content ">
					<notempty name="_list">
						<form id="export-form" method="post" action="" autocomplete="off">
							<table class="table table-bordered table-striped with-check">
								<thead>
									<tr>
										<th width="5%"><input type="checkbox" /></th>
										<th width="5%" nowrap="nowrap">ID</th>
										<th width="20%">标签名称</th>
										<th width="15%">所属分类</th>
										<th width="15%">标题名称</th>
										<th width="15%">关键字名称</th>
										<th width="15%">描述</th>
										<th width="10%">操作</th>
									</tr>
								</thead>
								<tbody>
									<volist name="_list" id="vo">
										<tr>
											<td class="taskStatus"><input type="checkbox" value="{$vo.ask_tags_id}" name="id[]" class="ids"/></td>
											<td class="taskStatus">{$i}</td>
											<td class="taskStatus">{$vo.ask_tags_name|strip_tags}</td>
											<td class="taskStatus">
											{$category_info[$vo['ask_category_id']]['ask_category_name']}
											</td>
											<td class="taskStatus">{$vo.ask_tags_title|strip_tags|msubstr=###,0,10}</td>
											<td class="taskStatus">{$vo.ask_tags_keyword|strip_tags|msubstr=###,0,10}</td>
											<td class="taskStatus">{$vo.ask_tags_description|strip_tags|msubstr=###,0,10}</td>
											<td class="taskStatus">
												<a title="编辑" href="{:U('editTags?id='.$vo['ask_tags_id'])}"><i class="icon-pencil"></i> 编辑</a> 　
												<a href="{:U('changeAskTags',array('id'=>$vo['ask_tags_id'],'method'=>'delete'))}" class="ajax-get confirm"><i class="icon-remove"></i> 删除</a>
											</td>
										</tr>
									</volist>
								</tbody>
							</table>
							<div class="dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_full_numbers" id="DataTables_Table_0_paginate">
								{$_page}
							</div>
						</form>
					<else/>
						<center>暂无内容</center>
					</notempty>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">

//条件框
$("#j-filter-hide").click(function(){
	$("#j-filter-box").fadeOut(300);
	$("#j-filter-show").fadeIn(300);
});
$("#j-filter-show").click(function(){
	$("#j-filter-box").fadeIn(300);
	$(this).fadeOut(300);
});
$(function (){
	set_value("ask_category_pid","{:(int)I('get.ask_category_pid')}");
	set_value("ask_category_id","{:(int)I('get.ask_category_id')}");
	set_value("position","{:(int)I('get.position')}");
	});
$(function (){
	//新增跳转页面
	$('#add').click(function(){
		window.location.href="{:U('Article/addTags')}";
	});
});
//导航高亮
highlight_subnav("{:U('Article/tags')}");
</script>
</block>